<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateIntefacesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('intefaces', function (Blueprint $table) {
            $table->id();
            $table->string('model_type')->nullable(true)->comment('模型');
            $table->integer('model_id')->nullable(true)->comment('模型id');
            $table->string('apikey')->nullable(true)->comment('密钥');
            $table->json('interfaces')->nullable(true)->comment('相关接口');
            $table->json('callback')->nullable(true)->comment('回调接口');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('intefaces');
    }
}
